ulid-rs
This is a Rust implementation of the ulid project which provides Universally Unique Lexicographically Sortable Identifiers.
Quickstart
// Generate a ulid
let ulid = new;
// Generate a string for a ulid
let s = ulid.to_string;
// Create from a String
let res = from_string;
assert_eq!;
Benchmark
Benchmarks were run on my laptop. Run them yourself with cargo bench
.
test bench_from_string ... bench: 46 ns/iter (+/- 4)
test bench_from_time ... bench: 84 ns/iter (+/- 7)
test bench_new ... bench: 148 ns/iter (+/- 29)
test bench_to_string ... bench: 53 ns/iter (+/- 7)